/**
 * @param {number} start
 * @param {number} goal
 * @return {number}
*/
var minBitFlips = function(start, goal) {
  let num = start ^ goal, result = 0;
  while(num) {
    if(num % 2) result++;
    num = Math.floor(num / 2);
  }
  return result;
};
let start = 10, goal = 7;
console.log(minBitFlips(start, goal));
start = 3, goal = 4;
console.log(minBitFlips(start, goal));
